<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>栏目排序</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function () {
		$('.commonTable tr').hover(function () {
			$(this).css('background-color', '#ffffae');
		},
        function () {
        	$(this).css('background-color', '#FFFFFF');
        });
       });
</script>
</head>
<body>
<form name="form1" action="/cms/savecolumnsort" method="post" >
<div class="listTitle">栏目排序</div>
<input type="hidden" name="sid" value="<?=$sid?>" />
<input type="hidden" name="pid" value="<?=$pid?>" />
	<div><table class="commonTable"  cellspacing="0" cellpadding="5" >
	    <tr>
	    	<th>栏目
		    </th>
		    <th>顺序</th>		    
	    </tr>
		<?php foreach ($query->result() as $row){?>
			<tr>
			<td><?=$row->cname?></td>
			<td><input type="text" id="txt_<?=$row->cid?>" name="txt_<?=$row->cid?>" value="<?=$row->sortno?>" ></td>
			</tr>
		<?php } ?>
		<tr><td></td><td><input type="submit" value=" 确定 " />&nbsp;&nbsp;<input type="button" value="取消" onclick="window.location='/cms/columns/<?=$sid?>/<?=$pid?>';"/></td></tr>
	</table></div>
	<div style="text-align:center;"></div>
	</form>
</body>
</html>